package objects;

import audioPlayer.AudioPlayer;
import java.awt.Graphics;

import javafx.scene.canvas.GraphicsContext;

import drawables.Drawable;

public class TrackLine{
	int x=0;
	int y=30;

	public void paint(Graphics g) {
		int lineSize = Track.TRACK_HEIGHT * Track.TRACK_NUM;
		
		g.drawLine(x, y, x, y+lineSize);
		
	}
	
	public void paint(GraphicsContext g) {
		int lineSize = Track.TRACK_HEIGHT * Track.TRACK_NUM;
		
		g.strokeLine(x, y, x, y+lineSize);
		
	}
	
	public void setX(int x) {
		this.x = x;
	}
        
        public void setXQuatized(int x){
            int q = AudioPlayer.get().getQuantizedMesurment();
            x /= q;
            x *= q;
            
            this.x = x;
        }
	
	public int getX() {
		return x;
	}
	
	public void reset(){
		x=0;
	}

}
